package com.charry.VO;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

/**
 * 商品(包含类目)
 * Created by Charry on 2017/11/2.
 */
@Data
public class ProductVO {

    /*
    对象JSON格式
    "name": "热榜",
    "type": 1,
    "foods": [
        {
        "id": "123456",
        "name": "皮蛋粥",
        "price": 1.2,
        "description": "好吃的皮蛋粥",
        "icon": "http://xxx.com",
        }
        ]
    */

    @JsonProperty("name")
    private String categoryName;

    @JsonProperty("type")
    private Integer categoryType;

    @JsonProperty("foods")
    private List<ProductInfoVO> productInfoVOList;

    public ProductVO(String categoryName, Integer categoryType) {
        this.categoryName = categoryName;
        this.categoryType = categoryType;
    }
}
